/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ModelLayer;
import java.util.ArrayList;
/**
 *
 * @author Martin
 */
public class Order {
    private String orderDate;
    private String tenderDate;
    private int tenderStatus;
    private double totalPrice;
    private Person customer;
    private Person employee;
    private Invoice invoice;
    private ArrayList<Task> tasks;
    private int orderId;
    
    /**
     * 
     */
    public Order()
    {
        tasks = new ArrayList<Task>();
    }
    

    public Order(String orderDate, String tenderDate, int tenderStatus, double totalPrice, Person customer, Person employee, Invoice invoice) {
        this.orderDate = orderDate;
        this.tenderDate = tenderDate;
        this.tenderStatus = tenderStatus;
        this.totalPrice = totalPrice;
        this.customer = customer;
        this.employee = employee;
        this.invoice = invoice;
        tasks = new ArrayList<Task>();
    }

    /**
     * @return the orderDate
     */
    public String getOrderDate() {
        return orderDate;
    }

    /**
     * @param orderDate the orderDate to set
     */
    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    /**
     * @return the tenderDate
     */
    public String getTenderDate() {
        return tenderDate;
    }

    /**
     * @param tenderDate the tenderDate to set
     */
    public void setTenderDate(String tenderDate) {
        this.tenderDate = tenderDate;
    }

    /**
     * @return the tenderStatus
     */
    public int getTenderStatus() {
        return tenderStatus;
    }

    /**
     * @param tenderStatus the tenderStatus to set
     */
    public void setTenderStatus(int tenderStatus) {
        this.tenderStatus = tenderStatus;
    }

    /**
     * @return the totalPrice
     */
    public double getTotalPrice() {
        return totalPrice;
    }

    /**
     * @param totalPrice the totalPrice to set
     */
    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * @return the customer
     */
    public Person getCustomer() {
        return customer;
    }

    /**
     * @param customer the customer to set
     */
    public void setCustomer(Person customer) {
        this.customer = customer;
    }

    /**
     * @return the invoice
     */
    public Invoice getInvoice() {
        return invoice;
    }

    /**
     * @param invoice the invoice to set
     */
    public void setInvoice(Invoice invoice) {
        this.invoice = invoice;
    }

    /**
     * @return the tasks
     */
    public Task getTasks(int index) {
        return tasks.get(index);
    }

    /**
     * @param tasks the tasks to set
     */
    public void setTasks(Task task) {
        tasks.add(task);
    }
    
    public ArrayList<Task> getTasks()
    {
        return tasks;
    }
    
    public void setArrayTasks(ArrayList<Task> tasks)
    {
        this.tasks = tasks;
    }
    
    /**
     * Method that gets an orders orderId
     * @return returns an orderId
     */
    public int getOrderId()
    {
        return orderId;
    }
    
    /**
     * Method that sets an orderId
     * @param orderId 
     */
    public void setOrderId(int orderId)
    {
        this.orderId = orderId;
    }

    /**
     * @return the employee
     */
    public Person getEmployee() {
        return employee;
    }

    /**
     * @param employee the employee to set
     */
    public void setEmployee(Person employee) {
        this.employee = employee;
    }
    
    public int getSize()
    {
        return tasks.size();
    }
    
}
